An image processing apparatus of Patent Literature 1 limits the amounts of code for intra-prediction and inter-prediction in turn when performing video encoding. In addition, in the image processing apparatus of Patent Literature 1, when the amount of code per picture is expected to exceed a predetermined upper limit, encoding is controlled to suppress the amount of code, by which the exceeding of the upper limit is avoided.